
using Qdb.CS.Config;
using Qdb.CS.Internal.Config;
using Qdb.Config;
using Qdb.Internal;
using Qdb.Internal.Config;

namespace Qdb.CS.Internal.Config
{
	public class QdbClientServerLegacyConfigurationBridge
	{
		public static IClientConfiguration AsClientConfiguration(IConfiguration config)
		{
			return new ClientConfigurationImpl((Config4Impl)config);
		}

		public static IServerConfiguration AsServerConfiguration(IConfiguration config)
		{
			return new ServerConfigurationImpl((Config4Impl)config);
		}

		public static Config4Impl AsLegacy(object config)
		{
			return ((ILegacyConfigurationProvider)config).Legacy();
		}

		public static INetworkingConfiguration AsNetworkingConfiguration(IConfiguration config
			)
		{
			return AsServerConfiguration(config).Networking;
		}
	}
}
